<?php
/**
 * [PHPFOX_HEADER]
 */

defined('PHPFOX') or exit('NO DICE!');

/**
 *
 *
 * @copyright		[PHPFOX_COPYRIGHT]
 * @author  		Raymond Benc
 * @package  		Module_Feed
 * @version 		$Id: display.class.php 4621 2012-09-12 05:34:34Z Raymond_Benc $
 */
class Survey_Component_Block_Comment extends Phpfox_Component
{
	/**
	 * Class process method wnich is used to execute this component.
	 */
	public function process()
	{
		$aItem = $this->getParam("aItem");
		$aComments = Phpfox::getService('comment')->getCommentsForFeed("survey", $aItem['survey_id'], Phpfox::getParam('comment.total_amount_of_comments_to_load'));
		$this->template()->assign(array(
				'iCnt' => count($aComments),
				'aComments' => $aComments,
			)
		);
		return 'block';
	}

	public function clean()
	{
		$this->template()->clean(array(
				'sHeader',
				'aFeeds',
				'sBoxJsId'
			)
		);
	}
}

?>